<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <title>U净首页</title>
    <link rel="stylesheet" href="./font/iconfont.css">
    <link rel="stylesheet" href="./swiper/swiper/swiper-bundle.min.css">
    <style>
        h2,p,ul,body{
            padding: 0;
            margin: 0;
        }
        img{
            display: block;
            border: none;
        }
        .outbox{
            width: 100%;
            height: 500px;
            background-color: rgb(69, 66, 205);
        }
        #head{
            display: flex;
            height: 60px;
        }
        #head h2{
            color: #fff;
            font-weight:lighter;
            font-size: 15px; 
            line-height: 15px;
            padding-top: 10px;
            padding-left: 1%;
        }
        #head .icon-weizhi{
            color: #fff;
            font-size: 15px;
            padding: 10px 0px 5px 2%;
        }
        #head .icon-lingsheng{
            font-size: 20px;
            color: #fff;
            position: relative;
            font-weight: bold;
            left: 35%;
            top:8px;
    
        }
        #onfun{
            display: flex;
        }
        #onfun li{
            width: 40%;
            text-align: center;   
            list-style: none;    
        }
        #onfun a{
            color: #fff;
            text-decoration: none;
        }
        #onfun .iconfont{
            font-size: 40px;
            margin-left: 75px;
        }
        #onfun p{
            font-size: 13px;
            font-weight: bold;
            margin-top: 10px;
            margin-left: 75px;
        }
        .inbox{
            margin-top:40px;
            background-color: #fff;
            border-radius: 30px;
        }
        .inbox a{
            text-decoration: none;
        }
        .service{
            display: flex;
            padding-top: 30px;
        }
        .service li{
            width: 12%;
            text-align: center;
            list-style: none;
            padding-left: 5px;
            margin-left: 19px;
        }
        .ser{
            margin: 0 auto;
            padding-top: 5px;
            padding-bottom: 5px;
            border-radius: 10px;
        }
        .service .iconfont{
            font-size: 30px;
            color: #000;
        }
        .service p{
            color: #000;
            padding-top: 5px;
            font-size: 14px;
            font-weight: normal;
        }
        .xihong{
            background-color: rgb(89, 147, 255);

        }
        .yinyongshui{
            background-color: rgb(253, 178, 25);
        }
        .linyu{
            background-color: rgb(87, 148, 255);
        }
        .kongtiao{
            background-color: rgb(243, 104, 97);
        }
        .chuifeng{
            background-color: rgb(90, 106, 245);
        }
        .activity{
            display: flex;
            padding-top: 30px;
            padding-bottom: 20px;
        }
        .activity li{
            width: 11%;
            text-align: center;
            list-style: none;
            padding-left: 20px;
            margin-left: 19px;
        }
        .act{
            margin: 0 auto;
            border-radius: 100%;
            width: 40px;
            height: 35px;
            padding-top: 5px;
        }
        .act .tip{
            width: 30px;
            height: 15px;
            background-color: rgb(255, 108, 106);
            border-radius: 30px;
            position: relative;
            bottom: 40px;
            left: 22px;
        }
        .act .tip p{
            line-height: 10px;
            font-size:1px;
            color: #fff;
        }
        .activity .iconfont{
            font-size: 28px;
            color: #fff;
        }
        .activity #cont{
            width: 70px;
            color: #000;
            padding-top: 2px;
            font-size: 14px;
            font-weight: normal;
            margin-left: -15px;
        }
        .yifu{
            background-color: rgb(210, 0, 255);
        }
        .huafei{
            background-color: rgb(141, 209, 248);
        }
        .jiudian{
            background-color: rgb(76, 154, 252);
        }
        .qiandao{
            background-color: rgb(245, 189, 66);
        }
        .ad img{
            width: 96%;
            height: 100px;
            margin-left: 2%;
        }        
        .rem{
            padding-top:15px;
        }
        .text1{
            display: flex;

            position: relative;
        }
        .icon-shuxian{
            font-size: 30px;
            margin-left: -5px;
            color: rgb(69, 66, 205);
        }
        .text1 h2{
            font-size: 18px;
            margin-top: 3px;
            margin-left: -5px;
        }
        .rem_ad{
            text-align: center;
            display: flex;
        }
        .ad1{
            width: 47%;
        }
        .ad2{
            width: 47%;
        }
        .rem_ad img{
            width: 100%;
            border-radius: 10px;
            margin: 0;
        }
        .ad1 img{
            margin-left: 4%;
        }
        .ad2 img{
            margin-left: 15px;
        }
        .look{
            padding-top:15px;
            padding-bottom: 80px;
        }
        .text2{
            display: flex;

            position: relative;
        }
        .text2 h2{
            font-size: 18px;
            padding-top: 2px;
            margin-left: -5px;
        }
        .look_ad img{
            width: 96%;
            border-radius: 20px;
            margin-left: 2%;
            border: 1px solid rgb(201, 199, 199);
        }
        #navi{
            padding-top: 5px;
            list-style: none;
            position: fixed;
            left: 0;
            bottom: 0;
            width: 100%;
            background-color: #fff;
            z-index: 9;
            display: flex;
            border-top: 1px solid rgb(231, 230, 230);
        }
        #navi>li{
            width: 33.3%;
            text-align: center;
        }
        a{
        text-decoration: none;
        color: rgb(0102, 102, 102);
        }
        .nav_cg {
            width: 25px;
            height: 25px;
            vertical-align: 10px;
            fill: currentColor;
            overflow: hidden; 
        }
        #navi p{
            font-size: 10px;
            margin-top: -15px;     
        }
        .nav_cg:active{
            color: rgb(69, 66, 205);
        }
        #box{
            width: 100%;
            display: flex;
            position: fixed;
            height: 50px;
            background-color: rgb(69, 66, 205);
            z-index: 4;
            transition: all .6s;
            opacity:0;
        }
        .head{
            position: relative;
            fill:#fff;
            bottom: 50px;
            width: 30px;
        }
        .sm{
            margin-left: 30px;
        }
        .sb{
            width: 35px;
            margin-left: 40px;
        }
        .ls{
            margin-left: 230px;
        }
        .hx{
            position: relative;
            bottom: 80px;
        }
        .hx p{
            font-size: 10px;
        }
</style>
</head>
<script src="font/iconfont.js"></script>

<body>
    <div id="box">
        <a href="#">
            <svg class="head sm" aria-hidden="true">
                <use xlink:href="#icon-saoma"></use>
            </svg>
        </a>
        <a href="./U6.html">
            <svg class="head sb" aria-hidden="true">
                <use xlink:href="#icon-shebei"></use>
            </svg>
        </a>
        <a href="#">
            <svg class="head ls" aria-hidden="true">
                <use xlink:href="#icon-lingsheng"></use>
            </svg>
        </a>
    </div>
    <div class="outbox">
        <header id="head">
            <span class="iconfont icon-weizhi"></span>
            <h2>大连啦啦啦大学啦啦啦校区</h2>
            <span class="iconfont icon-lingsheng"></span>
        </header>
         <ul id="onfun">
            <li>  
                <a href="#">
                    <span class="iconfont icon-saoma"></span>
                    <p>扫一扫</p>
                </a>
            </li>
            <li>
                <a href="./U6.html">
                    <span class="iconfont icon-shebei"></span>
                    <p>附近设备</p>
                </a>
            </li>
        </ul>
        <div class="inbox">
            <div class="service">
                <li>  
                    <a href="#">
                        <div class="ser xihong">                      
                            <span class="iconfont icon-xiyiji"></span>
                        </div>
                        <p>洗烘</p>
                    </a>
                </li>
                <li>
                    <a href="#">
                        <div class="ser yinyongshui">                      
                            <span class="iconfont icon-yinshuiji"></span>
                        </div>
                        <p>饮用水</p>
                    </a>
                </li>
                <li>  
                    <a href="./U5.html">
                        <div class="ser linyu">                      
                            <span class="iconfont icon-linyu"></span>
                        </div>
                        <p>淋浴</p>
                    </a>
                </li>
                <li>
                    <a href="#">
                        <div class="ser kongtiao">                      
                            <span class="iconfont icon-kongtiao"></span>
                        </div>
                        <p>空调</p>
                    </a>
                </li>
                <li>  
                    <a href="#">
                        <div class="ser chuifeng">                      
                            <span class="iconfont icon-chuifengji"></span>
                        </div>
                        <p>吹风</p>
                    </a>
                </li>
            </div>
            <div class="activity">
                <li>  
                    <a href="#">
                        <div class="act yifu">                      
                            <span class="iconfont icon-yifu"></span>
                            <div class="tip">
                                <p>0元</p>
                            </div>
                        </div>
                        <p id="cont">领洗衣凝珠</p>
                    </a>
                </li>
                <li>
                    <a href="#">
                        <div class="act huafei">                      
                            <span class="iconfont icon-huafei"></span>
                            <div class="tip">
                                <p>-5元</p>
                            </div>
                        </div>
                        <p id="cont">话费充值</p>
                    </a>
                </li>
                <li>  
                    <a href="#">
                        <div class="act jiudian">                      
                            <span class="iconfont icon-jiudian"></span>
                            <div class="tip">
                                <p>抢券</p>
                            </div>
                        </div>
                        <p id="cont">同程酒店</p>
                    </a>
                </li>
                <li>
                    <a href="#">
                        <div class="act qiandao">                      
                            <span class="iconfont icon-qiandao"></span>
                        </div>
                        <p id="cont">外卖券</p>
                    </a>
                </li>
            </div>
            <div class="swiper ad">
                <div class="swiper-wrapper">
                    <div class="swiper-slide">
                        <a href="#"><img src="./ad/1.jpg"></a>
                    </div>
                    <div class="swiper-slide">
                        <a href="#"><img src="./ad/2.jpg"></a>
                    </div>            
                </div>
                <div class="swiper-pagination"></div>
            </div>
            <div class="rem">
                <div class="text1">
                    <span class="iconfont icon-shuxian"></span>
                    <h2>平台推荐</h2>
                </div>
                <div class="rem_ad">
                    <div class="ad1">
                        <a href="#"><img src="./ad/3.jpg"></a>
                    </div>
                    <div class="ad2">
                        <a href="#"><img src="./ad/4.jpg"></a>
                    </div>
                </div>
            </div>
            <div class="look">
                <div class="text2">
                    <span class="iconfont icon-shuxian"></span>
                    <h2>同学们都在看</h2>
                </div>
                <div class="look_ad">
                    <a href="#"><img src="./ad/5.jpg"></a>
                </div>
            </div> 
            <div class="hx">
                <p>成风</p>
                <p>Wind</p>
            </div>
            <ul id="navi">
                <li>
                    <a href="#">
                        <svg class="nav_cg" aria-hidden="true">
                            <use xlink:href="#icon-shouye"></use>
                        </svg>
                        <p>首页</p>
                    </a>
                </li>
                <li>
                    <a href="./U2.html">
                        <svg class="nav_cg" aria-hidden="true">
                            <use xlink:href="#icon-biaoqian"></use>
                        </svg>
                        <p>订单</p>
                    </a>
                </li>
                <li>
                    <a href="./U3.html">
                        <svg class="nav_cg" aria-hidden="true">
                            <use xlink:href="#icon-smile-full"></use>
                        </svg>
                        <p>我的</p>
                    </a>
                </li>
            </ul>
        </div>
    </div>

    <script src="swiper/swiper/swiper-bundle.min.js"></script>

    <script>
        var swiper1 = new Swiper(".ad", {
          pagination: {
            el: ".swiper-pagination",
            clickable:true
          },
          autoplay: {
          delay: 2500,
          disableOnInteraction: false,
          }
        });
      </script>

<script>
    window.onscroll=function(){
        var st=document.documentElement.scrollTop||document.body.scrollTop;
        console.log(st);
        if(st>0){
            box.style.opacity=1;
        }
        else{
            box.style.opacity=0;
        }
    }
</script>
</body>
</html>